﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RegisterUserControl.ascx.cs" Inherits="Buy2Site.UserControls.RegisterUserControl" %>
<%@ Register src="BirthDateControl.ascx" tagname="BirthDateControl" tagprefix="uc1" %>
<div>
<table>
    <tr>
        <td>
            Personal Details
        </td>
        <td>
            Account Details
        </td>
    </tr>
    <tr>
        <td>
            
            <asp:Label ID="Label1" runat="server" Text="First Name"></asp:Label>
            <asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtFirstName" Text="*" ForeColor="Red"
                ErrorMessage="Missing First Name">
            </asp:RequiredFieldValidator>
            
        </td>
        <td>
            <asp:Label ID="Label8" runat="server" Text="User Name"></asp:Label>
            <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                ControlToValidate="txtUserName" Text="*" ForeColor="Red"
                ErrorMessage="Missing User Name">
            </asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label3" runat="server" Text="Last Name"></asp:Label>
            <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtLastName" Text="*" ForeColor="Red"
                ErrorMessage="Missing Last Name">
            </asp:RequiredFieldValidator>
        </td>        
        <td>
            <asp:Label ID="Label2" runat="server" Text="Email"></asp:Label>
            <asp:TextBox ID="txtEmail" runat="server" ></asp:TextBox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                runat="server" ErrorMessage="Invalid Email"
                ControlToValidate="txtEmail"
                ForeColor="Red"
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic">
            </asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                ControlToValidate="txtEmail" Text="*" ForeColor="Red"
                ErrorMessage="Missing Email">
            </asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label5" runat="server" Text="Birth Date"></asp:Label>
            <asp:TextBox ID="txtBirthDate" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtBirthDate" Text="*" ForeColor="Red"
                ErrorMessage="Missing Birth Date">
            </asp:RequiredFieldValidator>
        </td>
        <td>
            <asp:Label ID="Label4" runat="server" Text="Password"></asp:Label>
            <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox> 
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ControlToValidate="txtPassword" Text="*" ForeColor="Red"
                ErrorMessage="Missing Password">
            </asp:RequiredFieldValidator>           
        </td>         
    </tr>
    <tr>
        <td>
            <%--<uc1:BirthDateControl ID="BirthDateControl1" runat="server"  />--%>
            <asp:Calendar ID="calander" runat="server" OnSelectionChanged="selectDate"></asp:Calendar>
        </td>
        <td valign="top">
            <asp:Label ID="Label6" runat="server" Text="Confirm Password"></asp:Label>
            <asp:TextBox ID="txtConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
            <asp:CompareValidator ID="CompareValidator1" runat="server"
                ControlToCompare="txtPassword" ControlToValidate="txtConfirmPassword" 
                ErrorMessage="Passwords are not the same" Type="String" Text="*" ForeColor="Red" >
            </asp:CompareValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                ControlToValidate="txtConfirmPassword" Text="*" ForeColor="Red"
                ErrorMessage="Missing Confirm Password">
            </asp:RequiredFieldValidator>
        </td>            
    </tr>   
    <tr>
        <td></td>
        <td dir="rtl">
            <asp:Button ID="btnRegister" runat="server" Text="Register" 
                onclick="btnRegister_Click" />
        </td>
    </tr>    
</table>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</div>
